Symbolic derivation qubit-cavity Hamiltonian

Based on: J. R. Johansson (robert@riken.jp), http://jrjohansson.github.io, and Eunjong Kim.

Setup modules


In [1]:
from sympy import *
init_printing()

In [2]:
from sympsi import *
from sympsi.boson import *
from sympsi.pauli import *

The Jaynes-Cummings model

The Jaynes-Cummings model is one of the most elementary quantum mechanical models light-matter interaction. It describes a single two-level atom that interacts with a single harmonic-oscillator mode of a electromagnetic cavity.

The Hamiltonian for a two-level system in its eigenbasis can be written as

$$ H = \frac{1}{2}\omega_q \sigma_z $$

and the Hamiltonian of a quantum harmonic oscillator (cavity or nanomechanical resonator, NR) is

$$ H = \hbar\omega_r (a^\dagger a + 1/2) $$$$ H = \hbar\omega_{NR} (b^\dagger b + 1/2) $$

The atom interacts with the electromagnetic field produced by the cavity (NR) mode $a + a^\dagger$ ($b + b^\dagger$) through its dipole moment. The dipole-transition operators is $\sigma_x$ (which cause a transition from the two dipole states of the atom). The combined atom-cavity Hamiltonian can therefore be written in the form

$$ H = \hbar \omega_r (a^\dagger a + 1/2) + \hbar \omega_{NR} (b^\dagger b + 1/2) + \frac{1}{2}\hbar\Omega\sigma_z + \hbar \sigma_x \left( g(a + a^\dagger) + \lambda(b + b^\dagger)\right) $$

Although the Jaynes-Cumming Hamiltonian allow us to evolve the given initial state according to the Schrödinger Equation, in an experiment we would like to predicte the response of the coupled cavity-NR-qubit system under the influence of driving fields for the cavity and qubit, and also account for the effects of dissipation and dephasing (not treated here)

The external coherent-state input may be incorporated in the Jaynes-Cummings Hamiltonian by addition of terms involving the amplitude of the driving field $\vec{E_d} \left(\vec{E_s}\right)$ and it's frequency $\omega_d\left(\omega_s\right)$

$$ H_{cavity} = E_d \left(e^{i\omega_dt}a +e^{-i\omega_dt}a^\dagger\right) $$$$ H_{qubit} = E_s \left(e^{i\omega_st}\sigma_- +e^{-i\omega_st}\sigma_+\right) $$$$ H_{NR} = E_p \left(e^{i\omega_st}b +e^{-i\omega_st}b^\dagger\right) $$

To obtain the Jaynes-Cumming Hamiltonian

$$ ? H = \hbar\omega_r (a^\dagger a + 1/2) %-\frac{1}{2}\Delta\sigma_x + \frac{1}{2}\hbar\Omega\sigma_z + \hbar \sigma_x \left( g(a + a^\dagger) + \lambda(b + b^\dagger)\right) $$

we also need to perform a rotating-wave approximation which simplifies the interaction part of the Hamiltonian. In the following we will begin with looking at how these two Hamiltonians are related.

To represent the atom-cavity Hamiltonian in SymPy we creates an instances of the operator classes BosonOp and SigmaX, SigmaY, and SigmaZ, and use these to construct the Hamiltonian (we work in units where $\hbar = 1$).


In [3]:
# CPW, qubit and NR energies
omega_r, omega_q, omega_nr = symbols("omega_r, omega_q, omega_{NR}") 
# Coupling CPW-qubit, NR_qubit
g, L, chi, eps = symbols("g, lambda, chi, epsilon")
# Detuning 

# Drives and detunnings

Delta_d, Delta_s, Delta_p  = symbols(" Delta_d, Delta_s, Delta_p ")

A, B, C = symbols("A,B,C") # Electric field amplitude

omega_d, omega_s, omega_p = symbols("omega_d, omega_s, omega_p") # drive frequencies

# Detunning CPW-qubit, NR-qubit

Delta_CPW, Delta_NR = symbols("Delta_{CPW},Delta_{NR}")

# auxilary variables

x, y, t, Hsym = symbols("x, y, t, H ") 

Delta_SP, Delta_SD = symbols("Delta_{SP},Delta_{SD}")

In [4]:
# omega_r, omega_q, g, Delta_d, Delta_s, t, x, chi, Hsym = symbols("omega_r, omega_q, g, Delta_d, Delta_s, t, x, chi, H")

# A, B, C = symbols("A,B,C") # Electric field amplitude

# omega_d, omega_s = symbols("omega_d, omega_s") # 

# omega_nr, L = symbols("omega_{NR},lambda")

# Delta,Delta_t = symbols("Delta,Delta_t")

# y, omega_t = symbols("y, omega_t")

In [5]:
sx, sy, sz, sm, sp = SigmaX(), SigmaY(), SigmaZ(), SigmaMinus(), SigmaPlus()
a = BosonOp("a")
b = BosonOp("b")

In [50]:
H = omega_r * Dagger(a) * a + omega_q/2 * sz + omega_nr * Dagger(b) * b 

H_int = sx * (g  * (a + Dagger(a)))
H_int_2 = sx *( L * (b + Dagger(b)))


H_drive_r = A * (exp(I*omega_d*t)*a + exp(-I*omega_d*t)*Dagger(a))
H_drive_q = B * (exp(I*omega_s*t)*sm + exp(-I*omega_s*t)*sp)
H_drive_NR = C * (exp(I*omega_p*t)*b + exp(-I*omega_p*t)*Dagger(b))
H_total  =  H +   H_drive_r + H_drive_q + H_drive_NR #+ H_int + H_int_2 +
Eq(Hsym,H_total)


Out[50]:
$$H = A \left(e^{i \omega_{d} t} {a} + e^{- i \omega_{d} t} {{a}^\dagger}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{s} t} {\sigma_+}\right) + C \left(e^{i \omega_{p} t} {b} + e^{- i \omega_{p} t} {{b}^\dagger}\right) + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} + \omega_{{NR}} {{b}^\dagger} {b}$$

First move to the interaction picture:


In [7]:
U = exp(I * omega_r * t * Dagger(a) * a)

U


Out[7]:
$$e^{i \omega_{r} t {{a}^\dagger} {a}}$$

In [8]:
H2 = hamiltonian_transformation(U, H_total.expand(),independent = True)

H2


Out[8]:
$$A e^{i \omega_{d} t} e^{- i \omega_{r} t} {a} + A e^{- i \omega_{d} t} e^{i \omega_{r} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{s} t} {\sigma_+} + C e^{i \omega_{p} t} {b} + C e^{- i \omega_{p} t} {{b}^\dagger} + g e^{i \omega_{r} t} {\sigma_x} {{a}^\dagger} + g e^{- i \omega_{r} t} {\sigma_x} {a} + \lambda {\sigma_x} {{b}^\dagger} + \lambda {\sigma_x} {b} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{{NR}} {{b}^\dagger} {b}$$

In [9]:
U = exp(I * omega_q * t * sp * sm)

U


Out[9]:
$$e^{i \omega_{q} t {\sigma_+} {\sigma_-}}$$

In [10]:
H3 = hamiltonian_transformation(U, H2.expand(), independent = True)

H3 = H3.subs(sx, sm + sp).expand()

H3 = powsimp(H3)

H3


Out[10]:
$$A e^{- i \omega_{d} t + i \omega_{r} t} {{a}^\dagger} + A e^{i \omega_{d} t - i \omega_{r} t} {a} + B e^{- i \omega_{q} t + i \omega_{s} t} {\sigma_-} + B e^{i \omega_{q} t - i \omega_{s} t} {\sigma_+} + C e^{i \omega_{p} t} {b} + C e^{- i \omega_{p} t} {{b}^\dagger} + g e^{- i \omega_{q} t - i \omega_{r} t} {\sigma_-} {a} + g e^{- i \omega_{q} t + i \omega_{r} t} {\sigma_-} {{a}^\dagger} + g e^{i \omega_{q} t - i \omega_{r} t} {\sigma_+} {a} + g e^{i \omega_{q} t + i \omega_{r} t} {\sigma_+} {{a}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {{b}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {b} + \lambda e^{- i \omega_{q} t} {\sigma_-} {{b}^\dagger} + \lambda e^{- i \omega_{q} t} {\sigma_-} {b} - \frac{\omega_{q}}{2} \left(1 + {\sigma_z}\right) + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{{NR}} {{b}^\dagger} {b}$$

We introduce the detuning parameter $\Delta = \omega_q - \omega_r$ and substitute into this expression


In [11]:
# trick to simplify exponents
def simplify_exp(e):
    if isinstance(e, exp):
        return exp(simplify(e.exp.expand()))

    if isinstance(e, (Add, Mul)):
        return type(e)(*(simplify_exp(arg) for arg in e.args)) 

    return e

In [12]:
H4 = simplify_exp(H3).subs(-omega_r + omega_q, Delta_CPW)

H4


Out[12]:
$$A e^{i t \left(- \omega_{d} + \omega_{r}\right)} {{a}^\dagger} + A e^{i t \left(\omega_{d} - \omega_{r}\right)} {a} + B e^{i t \left(- \omega_{q} + \omega_{s}\right)} {\sigma_-} + B e^{i t \left(\omega_{q} - \omega_{s}\right)} {\sigma_+} + C e^{i \omega_{p} t} {b} + C e^{- i \omega_{p} t} {{b}^\dagger} + g e^{i \Delta_{{CPW}} t} {\sigma_+} {a} + g e^{i t \left(\omega_{q} + \omega_{r}\right)} {\sigma_+} {{a}^\dagger} + g e^{- i t \left(\omega_{q} + \omega_{r}\right)} {\sigma_-} {a} + g e^{- i \Delta_{{CPW}} t} {\sigma_-} {{a}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {{b}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {b} + \lambda e^{- i \omega_{q} t} {\sigma_-} {{b}^\dagger} + \lambda e^{- i \omega_{q} t} {\sigma_-} {b} - \frac{\omega_{q}}{2} \left(1 + {\sigma_z}\right) + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{{NR}} {{b}^\dagger} {b}$$

Now, in the rotating-wave approximation we can drop the fast oscillating terms containing the factors $ e^{\pm i( (\omega_q + \omega_r)t}$


In [13]:
H5 = drop_terms_containing(H4, [exp( I * (omega_q + omega_r) * t),
                                exp(-I * (omega_q + omega_r) * t)])

H5 = drop_c_number_terms(H5.expand())

Eq(Hsym, H5)


Out[13]:
$$H = A e^{i \omega_{d} t} e^{- i \omega_{r} t} {a} + A e^{- i \omega_{d} t} e^{i \omega_{r} t} {{a}^\dagger} + B e^{i \omega_{q} t} e^{- i \omega_{s} t} {\sigma_+} + B e^{- i \omega_{q} t} e^{i \omega_{s} t} {\sigma_-} + C e^{i \omega_{p} t} {b} + C e^{- i \omega_{p} t} {{b}^\dagger} + g e^{i \Delta_{{CPW}} t} {\sigma_+} {a} + g e^{- i \Delta_{{CPW}} t} {\sigma_-} {{a}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {{b}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {b} + \lambda e^{- i \omega_{q} t} {\sigma_-} {{b}^\dagger} + \lambda e^{- i \omega_{q} t} {\sigma_-} {b} + \omega_{{NR}} {{b}^\dagger} {b}$$

This is the interaction term of in the Jaynes-Cumming model in the interaction picture. If we transform back to the Schrödinger picture we have:


In [14]:
U = exp(-I * omega_r * t * Dagger(a) * a)
H6 = hamiltonian_transformation(U, H5.expand(), independent =True)

In [15]:
U = exp(-I * omega_q * t * sp * sm)
H7 = hamiltonian_transformation(U, H6.expand(),independent = True)

In [16]:
H8 = simplify_exp(H7).subs(Delta_CPW, omega_q - omega_r)

H8 = simplify_exp(powsimp(H8)).expand()

H8 = drop_c_number_terms(H8)

H = collect(H8, [g])

Eq(Hsym, H)


Out[16]:
$$H = A e^{i \omega_{d} t} {a} + A e^{- i \omega_{d} t} {{a}^\dagger} + B e^{i \omega_{s} t} {\sigma_-} + B e^{- i \omega_{s} t} {\sigma_+} + C e^{i \omega_{p} t} {b} + C e^{- i \omega_{p} t} {{b}^\dagger} + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \lambda {\sigma_-} {{b}^\dagger} + \lambda {\sigma_-} {b} + \lambda {\sigma_+} {{b}^\dagger} + \lambda {\sigma_+} {b} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} + \omega_{{NR}} {{b}^\dagger} {b}$$

In [26]:
H = collect(H,[L*sm])
H = collect(H,[L*sp])
H = collect(H,[L*(Dagger(b)+b), A, B ,C])
H = H.subs(sm+sp,sx)
H


Out[26]:
$$A \left(e^{i \omega_{d} t} {a} + e^{- i \omega_{d} t} {{a}^\dagger}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{s} t} {\sigma_+}\right) + C \left(e^{i \omega_{p} t} {b} + e^{- i \omega_{p} t} {{b}^\dagger}\right) + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \lambda \left({{b}^\dagger} + {b}\right) {\sigma_x} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} + \omega_{{NR}} {{b}^\dagger} {b}$$

Linearized interaction


In [ ]:


In [52]:
U = exp(I * Dagger(a) * a * omega_d * t)

In [53]:
H1 = hamiltonian_transformation(U, H_total, independent=True)

H1


Out[53]:
$$A \left({{a}^\dagger} + {a}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{s} t} {\sigma_+}\right) + C \left(e^{i \omega_{p} t} {b} + e^{- i \omega_{p} t} {{b}^\dagger}\right) - \omega_{d} {{a}^\dagger} {a} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} + \omega_{{NR}} {{b}^\dagger} {b}$$

In [55]:
U = exp(I * Dagger(b) * b * omega_p * t)

In [56]:
H2 = hamiltonian_transformation(U, H1, independent=True)

H2


Out[56]:
$$A \left({{a}^\dagger} + {a}\right) + B \left(e^{i \omega_{s} t} {\sigma_-} + e^{- i \omega_{s} t} {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) - \omega_{d} {{a}^\dagger} {a} - \omega_{p} {{b}^\dagger} {b} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} + \omega_{{NR}} {{b}^\dagger} {b}$$

In [57]:
U = exp(I * Dagger(sm) * sm * omega_s * t)

In [58]:
H3 = hamiltonian_transformation(U, H2, independent=True)

H3


Out[58]:
$$A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) - \omega_{d} {{a}^\dagger} {a} - \omega_{p} {{b}^\dagger} {b} + \frac{\omega_{q} {\sigma_z}}{2} + \omega_{r} {{a}^\dagger} {a} - \omega_{s} {\sigma_+} {\sigma_-} + \omega_{{NR}} {{b}^\dagger} {b}$$

In [73]:
# H4 = simplify_exp(H3).subs(omega_d - omega_s, -Delta_SD)

H4 = H3.collect([A,B,C,Dagger(a)*a,Dagger(b)*b, g, L])

In [78]:
H4


Out[78]:
$$A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) + \frac{\omega_{q} {\sigma_z}}{2} - \omega_{s} {\sigma_+} {\sigma_-} + \left(- \omega_{d} + \omega_{r}\right) {{a}^\dagger} {a} + \left(- \omega_{p} + \omega_{{NR}}\right) {{b}^\dagger} {b}$$

In [81]:
H5 = H4.expand().subs(-sp*sm , -sz/2 ).collect([A,B,C,Dagger(a)*a,Dagger(b)*b, g, L, sz])
H5


Out[81]:
$$A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) + \left(- \omega_{d} + \omega_{r}\right) {{a}^\dagger} {a} + \left(- \omega_{p} + \omega_{{NR}}\right) {{b}^\dagger} {b} + \left(\frac{\omega_{q}}{2} - \frac{\omega_{s}}{2}\right) {\sigma_z}$$

In [84]:
H5 = H5.subs(-omega_d + omega_r, -Delta_d).subs(-omega_p + omega_nr, - Delta_p).subs(omega_q/2 - omega_s/2, Delta_s); H5


Out[84]:
$$A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z}$$

In [85]:
H_total_01 = H5
Eq(Hsym,H_total_01)


Out[85]:
$$H = A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z}$$

In [86]:
H_total_01 = H_total_01 + H_int + H_int_2;
Eq(Hsym,H_total_01)


Out[86]:
$$H = A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z} + g {\sigma_x} \left({{a}^\dagger} + {a}\right) + \lambda {\sigma_x} \left({{b}^\dagger} + {b}\right)$$

In [87]:
U = exp(I * omega_r * t * Dagger(a) * a)

U


Out[87]:
$$e^{i \omega_{r} t {{a}^\dagger} {a}}$$

In [88]:
H2 = hamiltonian_transformation(U, H_total_01.expand(),independent = True)

H2


Out[88]:
$$A e^{i \omega_{r} t} {{a}^\dagger} + A e^{- i \omega_{r} t} {a} + B {\sigma_-} + B {\sigma_+} + C {{b}^\dagger} + C {b} - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z} + g e^{i \omega_{r} t} {\sigma_x} {{a}^\dagger} + g e^{- i \omega_{r} t} {\sigma_x} {a} + \lambda {\sigma_x} {{b}^\dagger} + \lambda {\sigma_x} {b} - \omega_{r} {{a}^\dagger} {a}$$

In [89]:
U = exp(I * omega_q * t * sp * sm)

U


Out[89]:
$$e^{i \omega_{q} t {\sigma_+} {\sigma_-}}$$

In [90]:
H3 = hamiltonian_transformation(U, H2.expand(), independent = True)

H3 = H3.subs(sx, sm + sp).expand()

H3 = powsimp(H3)

H3


Out[90]:
$$A e^{i \omega_{r} t} {{a}^\dagger} + A e^{- i \omega_{r} t} {a} + B e^{i \omega_{q} t} {\sigma_+} + B e^{- i \omega_{q} t} {\sigma_-} + C {{b}^\dagger} + C {b} - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z} + g e^{- i \omega_{q} t - i \omega_{r} t} {\sigma_-} {a} + g e^{- i \omega_{q} t + i \omega_{r} t} {\sigma_-} {{a}^\dagger} + g e^{i \omega_{q} t - i \omega_{r} t} {\sigma_+} {a} + g e^{i \omega_{q} t + i \omega_{r} t} {\sigma_+} {{a}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {{b}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {b} + \lambda e^{- i \omega_{q} t} {\sigma_-} {{b}^\dagger} + \lambda e^{- i \omega_{q} t} {\sigma_-} {b} - \frac{\omega_{q}}{2} \left(1 + {\sigma_z}\right) - \omega_{r} {{a}^\dagger} {a}$$

In [91]:
H4 = simplify_exp(H3).subs(-omega_r + omega_q, Delta_CPW)

H4


Out[91]:
$$A e^{i \omega_{r} t} {{a}^\dagger} + A e^{- i \omega_{r} t} {a} + B e^{i \omega_{q} t} {\sigma_+} + B e^{- i \omega_{q} t} {\sigma_-} + C {{b}^\dagger} + C {b} - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z} + g e^{i \Delta_{{CPW}} t} {\sigma_+} {a} + g e^{i t \left(\omega_{q} + \omega_{r}\right)} {\sigma_+} {{a}^\dagger} + g e^{- i t \left(\omega_{q} + \omega_{r}\right)} {\sigma_-} {a} + g e^{- i \Delta_{{CPW}} t} {\sigma_-} {{a}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {{b}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {b} + \lambda e^{- i \omega_{q} t} {\sigma_-} {{b}^\dagger} + \lambda e^{- i \omega_{q} t} {\sigma_-} {b} - \frac{\omega_{q}}{2} \left(1 + {\sigma_z}\right) - \omega_{r} {{a}^\dagger} {a}$$

In [92]:
H5 = drop_terms_containing(H4, [exp( I * (omega_q + omega_r) * t),
                                exp(-I * (omega_q + omega_r) * t)])

H5 = drop_c_number_terms(H5.expand())

Eq(Hsym, H5)


Out[92]:
$$H = A e^{i \omega_{r} t} {{a}^\dagger} + A e^{- i \omega_{r} t} {a} + B e^{i \omega_{q} t} {\sigma_+} + B e^{- i \omega_{q} t} {\sigma_-} + C {{b}^\dagger} + C {b} - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z} + g e^{i \Delta_{{CPW}} t} {\sigma_+} {a} + g e^{- i \Delta_{{CPW}} t} {\sigma_-} {{a}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {{b}^\dagger} + \lambda e^{i \omega_{q} t} {\sigma_+} {b} + \lambda e^{- i \omega_{q} t} {\sigma_-} {{b}^\dagger} + \lambda e^{- i \omega_{q} t} {\sigma_-} {b} - \frac{\omega_{q} {\sigma_z}}{2} - \omega_{r} {{a}^\dagger} {a}$$

In [93]:
U = exp(-I * omega_r * t * Dagger(a) * a)
H6 = hamiltonian_transformation(U, H5.expand(), independent =True)

In [94]:
U = exp(-I * omega_q * t * sp * sm)
H7 = hamiltonian_transformation(U, H6.expand(),independent = True)

In [97]:
H8 = simplify_exp(H7).subs(Delta_CPW, omega_q - omega_r)

H8 = simplify_exp(powsimp(H8)).expand()

H8 = drop_c_number_terms(H8)

H = collect(H8, [g])

In [98]:
H = collect(H,[L*sm])
H = collect(H,[L*sp])
H = collect(H,[L*(Dagger(b)+b), A, B ,C])
# H = H.subs(sm+sp,sx)
H


Out[98]:
$$A \left({{a}^\dagger} + {a}\right) + B \left({\sigma_-} + {\sigma_+}\right) + C \left({{b}^\dagger} + {b}\right) - \Delta_{d} {{a}^\dagger} {a} - \Delta_{p} {{b}^\dagger} {b} + \Delta_{s} {\sigma_z} + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \lambda \left({{b}^\dagger} + {b}\right) \left({\sigma_-} + {\sigma_+}\right)$$

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Dispersive Regime


In [181]:
U = exp((x * (  -Dagger(a) * sm + a * sp )).expand())

U


Out[181]:
$$e^{- x {{a}^\dagger} {\sigma_-} + x {a} {\sigma_+}}$$

In [182]:
H1 = hamiltonian_transformation(U, H, expansion_search=False, N=4).expand()

H1 = qsimplify(H1)

# H1

In [213]:
H2 = drop_terms_containing(H1.expand(), [ x**4,x**5,x**6])

# H2

In [214]:
H3 = H2.subs(x, g/Delta_CPW)

# H3

In [215]:
H4 = drop_c_number_terms(H3)

# H4

In [216]:
H5 = collect(H4, [Dagger(a) * a, sz])

# H5

In [217]:
U = exp(I * omega_r * t * Dagger(a) * a)

In [218]:
H6 = hamiltonian_transformation(U, H5.expand(),independent = True);
# H6

In [219]:
U = exp(I * omega_q * t * Dagger(sm) * sm)

In [220]:
H7 = hamiltonian_transformation(U, H6.expand(),independent=True); 
# H7

In [221]:
H8 = drop_terms_containing(H7, [exp(I * omega_r * t), exp(-I * omega_r * t),
                                exp(I * omega_q * t), exp(-I * omega_q * t)])

# H8

In [222]:
H9 = qsimplify(H8)

H9 = collect(H9, [Dagger(a) * a, sz])

# H9


/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sympsi/qutility.py:482: UserWarning: Too high level or recursion, aborting
  warnings.warn("Too high level or recursion, aborting")

In [223]:
U = exp(-I * omega_r * t * Dagger(a) * a)

In [224]:
H10 = hamiltonian_transformation(U, H9.expand(),independent = True);
# H10

In [225]:
U = exp(-I * omega_q * t * Dagger(sm) * sm)

In [226]:
H11 = hamiltonian_transformation(U, H10.expand(),independent=True); 
# H11

In [227]:
# H11  = drop_c_number_terms(H11)
H12 = qsimplify(H11)

H12 = collect(H12, [Dagger(a) * a, sz])

H12 = H12.subs(omega_r, omega_q-Delta_CPW).expand().collect([Dagger(a)*a, Dagger(b)*b, sz, L*g/2/Delta_CPW]).subs(omega_q-Delta_CPW,omega_r)

Eq(Hsym, H12)


/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sympsi/qutility.py:482: UserWarning: Too high level or recursion, aborting
  warnings.warn("Too high level or recursion, aborting")
Out[227]:
$$H = \lambda {{b}^\dagger} {\sigma_x} + \lambda {b} {\sigma_x} + \omega_{{NR}} {{b}^\dagger} {b} + {{a}^\dagger} {a} \left(\omega_{r} + \frac{g^{2} {\sigma_z}}{\Delta_{{CPW}}} - \frac{g^{2} \lambda {{b}^\dagger} {\sigma_x}}{2 \Delta_{{CPW}}^{2}} - \frac{g^{2} \lambda {b} {\sigma_x}}{2 \Delta_{{CPW}}^{2}} - \frac{4 g^{4}}{3 \Delta_{{CPW}}^{3}} - \frac{8 g^{4} {\sigma_z}}{3 \Delta_{{CPW}}^{3}} + \frac{4 g^{3} \lambda \left[{{a}^\dagger},{b}\right]}{3 \Delta_{{CPW}}^{3}} {\sigma_z} + \frac{g^{3} \lambda {\sigma_-} \left[{{a}^\dagger},{b}\right]}{2 \Delta_{{CPW}}^{3}} {\sigma_-} + \frac{g^{3} \lambda {\sigma_-} \left[{{a}^\dagger},{b}\right]}{2 \Delta_{{CPW}}^{3}} {\sigma_+} - \frac{g^{3} \lambda {\sigma_+} \left[{a},{{b}^\dagger}\right]}{2 \Delta_{{CPW}}^{3}} {\sigma_-} - \frac{g^{3} \lambda {\sigma_+} \left[{a},{{b}^\dagger}\right]}{2 \Delta_{{CPW}}^{3}} {\sigma_+} - \frac{g^{3} \lambda {\sigma_z} \left[{{a}^\dagger},{b}\right]}{2 \Delta_{{CPW}}^{3}} {\sigma_z} + \frac{g^{3} \lambda {\sigma_z} \left[{a},{{b}^\dagger}\right]}{2 \Delta_{{CPW}}^{3}} {\sigma_z}\right) + {\sigma_z} \left(\frac{\omega_{q}}{2} + \frac{g^{2}}{2 \Delta_{{CPW}}} - \frac{g \lambda}{\Delta_{{CPW}}} \left[{{a}^\dagger},{b}\right] - \frac{2 g^{4}}{3 \Delta_{{CPW}}^{3}} + \frac{g^{3} \lambda {{a}^\dagger} \left[{a},{{b}^\dagger}\right]}{2 \Delta_{{CPW}}^{3}} {{a}^\dagger} {\sigma_z} - \frac{g^{3} \lambda {a} \left[{{a}^\dagger},{b}\right]}{2 \Delta_{{CPW}}^{3}} {a} {\sigma_z} + \frac{2 g^{3} \lambda \left[{{a}^\dagger},{b}\right]}{3 \Delta_{{CPW}}^{3}} + \frac{2 g^{3} \lambda \left[{{a}^\dagger},{b}\right]}{3 \Delta_{{CPW}}^{3}} \left({a}\right)^{2}\right) + \frac{g^{2} \lambda}{\Delta_{{CPW}}^{2}} \left(- \frac{{{a}^\dagger} \left[{a},{{b}^\dagger}\right]}{2} e^{i \Delta_{{CPW}} t} e^{- i \omega_{q} t} {\sigma_x} - \frac{{{a}^\dagger} \left[{a},{{b}^\dagger}\right]}{2} {\sigma_x} - \frac{{{b}^\dagger} {\sigma_x}}{4} + \frac{i {{b}^\dagger}}{4} {\sigma_y} - \frac{{b} {\sigma_x}}{4} + \frac{i {b}}{4} {\sigma_y}\right) - \frac{g^{2} \omega_{{NR}}}{\Delta_{{CPW}}^{2}} {\sigma_+} \left[{a},{{b}^\dagger}\right] {\sigma_-} \left[{{a}^\dagger},{b}\right] - \frac{4 g^{4} \left({{a}^\dagger}\right)^{2} \left({a}\right)^{2}}{3 \Delta_{{CPW}}^{3}} {\sigma_z} + \frac{g^{3} \lambda}{\Delta_{{CPW}}^{3}} \left(\frac{\left[{{a}^\dagger},{b}\right]}{2} + {\sigma_-} \left[{{a}^\dagger},{b}\right] \left({{a}^\dagger}\right)^{2} {\sigma_-} + {\sigma_-} \left[{{a}^\dagger},{b}\right] \left({a}\right)^{2} {\sigma_+} + \frac{{\sigma_-} \left[{{a}^\dagger},{b}\right]}{2} {\sigma_+} - {\sigma_+} \left[{a},{{b}^\dagger}\right] \left({{a}^\dagger}\right)^{2} {\sigma_-} - {\sigma_+} \left[{a},{{b}^\dagger}\right] \left({a}\right)^{2} {\sigma_+} - \frac{{\sigma_+} \left[{a},{{b}^\dagger}\right]}{2} {\sigma_+}\right)$$

In [ ]:


In [ ]:


In [ ]: